﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using QLHS.DataLayer;
using QLHS.DTO;

namespace QLHS
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                Load_List();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Cannot load list Giao Vien!!!");
                Close();
            }
        }

        private void Load_List()
        {
            //dataGridView1.DataSource = GiaoVienDAO.LoadAll();
        }

        private void insert_btt_Click(object sender, EventArgs e)
        {
            GiaoVienDTO GVTemp = new GiaoVienDTO();
            GVTemp.MaSoGV = Convert.ToInt32(MSGV_TxtBox.Text);
            GVTemp.MaSoMH = Convert.ToInt32(MSMH_TxtBox.Text);
            GVTemp.TenGV = TenGV_TxtBox.Text;
           // GiaoVienDAO.Insert(GVTemp);            
            Load_List();            
        }
    }
}
